package com.example.demo.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 收件者A（消费者A）,自动回调
 */
@Component
@RabbitListener(queues = "fanout.b")
public class FanoutReceiverB {

    @RabbitHandler
    public void receive(String content) {
        System.out.println("fanout ReceiverB:" + content);
    }
}
